﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package net.wooga.pets.loading.loaders {
    import flash.events.*;
    import flash.net.*;
    import flash.errors.*;

    public class XMLLoader extends AbstractLoader {

        private var _loader:URLLoader;

        public function XMLLoader(){
            this._loader = new URLLoader();
            super();
        }
        override public function start():void{
            super.start();
            var request:URLRequest = getRequest(path);
            try {
                this._loader.load(request);
            } catch(error:IOError) {
                l(("could not load " + path));
            };
        }
        override protected function get data(){
            if (this._loader.data){
                return (this._loader.data);
            };
            return ({});
        }
        override protected function get dispatcher():IEventDispatcher{
            return (this._loader);
        }
        override protected function handleLoadedData():void{
            super.handleLoadedData();
        }
        override protected function onError(_arg1:IOErrorEvent):void{
            _result.success = false;
            super.onError(_arg1);
        }

    }
}//package net.wooga.pets.loading.loaders 
